package rcpexample.sampleview;


import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;

public class ProjectContentProvider implements ITreeContentProvider {

public Object[] getChildren(Object parentElement) {
return ((ProjectTree)parentElement).getChildren().toArray();
}

public Object getParent(Object element) {
return ((ProjectTree)element).getParent();
}

public boolean hasChildren(Object element) {
return ((ProjectTree)element).getChildren().size() > 0;
}

public Object[] getElements(Object inputElement) {
return ((ProjectTree)inputElement).getChildren().toArray();
}

public void dispose() { }

public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
}